#嵌套循环(while)
i=1
# while   i   <=5:
#     print("上班星期为：",i)
#     i=i+1
#     t=9
#     while   t   <=17:
#        print("时间段：",t,end ="  ")
#        t=t+1
#     print()
#(for)
# for i   in range(1,6):
#    print('上班为周：',i)
#    for t   in range(9,18):
#        print('时间段为：',t,end=" ")
#    print()
# 九九乘法表
# i = 1
# while i < 10:
#     j = 1
#     while j <= 1:
#         print("%d*%d=%d"%(j,i,j*i),end=' ')
#         j += 1
#         print("")
#         i += 1# while 中使用break跳出循环
i = 0
while i <= 5:
    i += 1  # i = i + 1
    print('星期为: ', i)
    if i == 3:
        break

i = 0
while i <= 5:
    if i == 3:
        break
    print('星期为：', i)
    i += 1

# for循环中使用break语句
for i in range(1, 6):
    print("星期", i)
    if i == 3:
        break


for i in range(1, 6):
    if i == 3:
        break
    print("星期", i)



# while循环中使用continue语句
i = 0
while i < 5:
    if i == 4:
        continue
    print("星期", i)

# for循环中使用continue语句
for i in range(1, 6):     # 遍历1,2,3,4,5,
    if i ==  4:
        continue
    print("星期", i)
for i in range(1, 10):
    for j in range(1, i +1):
        print('%d*%d=%d'%(j,i,j*i), end=' ')
    print()

